<script type="text/javascript" src="../../assets/javascripts/checkRegisterForm.js"></script>

<%= form_for(:user, :url => {:action => 'edit'}, :html => { :onsubmit => 'return checkUpdateForm ();' }) do |f| %>
    <div class="form_box" style="width: 470px;">
        <div class="field_name"><%= f.label("Username")%>
        <%= f.text_field :name, :class=>"text_box" %></div>
        
        <div class="field_name"><%= f.label("Email") %>
        <%= f.text_field :email, :class=>"text_box", :id=>"email" %></div>
        
        <div class="field_name"><%= f.label("Address") %>
        <%= f.text_field :address, :class=>"text_box" %></div>

        <div class="field_name"><%= f.label("Phone") %>
        <%= f.text_field:phone, :class=>"text_box", :id=>"phone" %></div>

        <div class="field_name"><%= f.label("Password:") %>******
        <button style="float: right; margin-right: 20px;" type="button" onclick="func('editPass', 'password')">Change password</button></div>
        <div id="editPass" class="field_name"></div>
	     
  	    <div style="font-size: 14px; color: brown;"class="field_name">Click to update
        <%= f.submit 'Update', :class=>'submit_button' %></div>

        <div class="lower" style="height: 60px;">
            <div class="error_form" id="emailError"></div>
            <div class="error_form" id="phoneError"></div>
            <div class="error_form" id="passError"></div>
        </div>
    </div>
  <% end %>
